OBJECTS		= fib.o fib_test.o
LIBRARIES	= libfib.a libfib.so
PROGRAMS	= fib_test

.PHONY:         all clean

# Default target: build everything.
all:            $(OBJECTS) $(LIBRARIES) $(PROGRAMS)

libfib.a:	fib.o fib_fast.o
	ar cr $@ $?

libfib.so:	fib.c fib_fast.c
	$(CC) $(CFLAGS) -fPIC -shared $< -o $@

fib_test: fib_test.c libfib.a
	$(CC) $(CFLAGS) $< -L. -lfib -o $@
#	$(CC) $(CFLAGS) $< -L. -static -lfib -o $@
#	$(CC) $(CFLAGS) $<  libfib.a -L. -lfib -o $@

# Clean up build products.
clean:
	rm -f *.o *.a *.so $(PROGRAMS)



